/*!
 * \file       ny8common.h
 * \brief      NY8Axxxx common header.
 * \author     HuangTing
 * \date       2017-04-14
 * \details    provide useful macro.
 *
 * 2021-12-16, add function mlti_16b
 */

#ifndef NY8COMMON_H_P69YF2F3
#define NY8COMMON_H_P69YF2F3

//! Enable interrupt
#define ENI() __asm__("ENI")

//! Disable interrupt
#define DISI() __asm__("DISI")

//! software interrupt
#define INT() __asm__("INT")

//! clear watch dog
#define CLRWDT() __asm__("clrwdt")

//! sleep
#define SLEEP() __asm__("sleep")

//! nop
#define NOP() __asm__("nop")

//! u32 = u16 x u16 multiply function
extern unsigned long multi_16b(unsigned int in1, unsigned int in2);

#endif /* end of include guard: NY8COMMON_H_P69YF2F3 */
